package com.yunhe.energy.domain.data;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunhe.energy.domain.data.pk.ElectricityPK;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.util.Date;

/**
 * 电量对象
 * @author liuronglei
 */
@ApiModel(value = "ElectricityMonth", description = "电量对象")
@Entity
@IdClass(ElectricityPK.class)
@Table(name = "data_power_electricity_month")
public class ElectricityMonth {
    @Id
    @Column(name = "device_id")
    private Long deviceId;
    @ApiModelProperty(value = "时间", example = "2017-12-06 00:00:00")
    @Id
    @Column(name = "dtime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dtime;
    @Column(name = "val")
    private Double val;
    @Column(name = "sharp")
    private Double sharp;
    @Column(name = "peak")
    private Double peak;
    @Column(name = "flat")
    private Double flat;
    @Column(name = "valley")
    private Double valley;

    public Date getDtime() {
        return dtime;
    }

    public void setDtime(Date dtime) {
        this.dtime = dtime;
    }

    public Double getVal() {
        return val;
    }

    public void setVal(Double val) {
        this.val = val;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public Double getSharp() {
        return sharp;
    }

    public void setSharp(Double sharp) {
        this.sharp = sharp;
    }

    public Double getPeak() {
        return peak;
    }

    public void setPeak(Double peak) {
        this.peak = peak;
    }

    public Double getFlat() {
        return flat;
    }

    public void setFlat(Double flat) {
        this.flat = flat;
    }

    public Double getValley() {
        return valley;
    }

    public void setValley(Double valley) {
        this.valley = valley;
    }
}
